package com.example.myapplication.nettyheart;

import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.os.IBinder;
import android.support.annotation.Nullable;

public class BaseNettyStatusService extends Service {

    private Thread mThread;
    private boolean isConnect = false;
    private Context mContext;

    @Override
    public void onCreate() {
        super.onCreate();
        mContext = this;
        mThread = new Thread(new Runnable() {
            @Override
            public void run() {
                HttpMsg();
//                while(true){
//                    try {
//                        LogUtils.i("dove", "心跳链接执行。。。。。。"+isConnect);
//                        HttpMsg();
//                        Thread.sleep(8*1000);
//                    }catch(Exception e){
//                        e.printStackTrace();
//                    }
//                }
            }
        });
        mThread.start();
    }

    /**
     * 心跳请求
     */
    private void HttpMsg() {
        if(!isConnect){

        }else{

        }
    }

    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }
}
